The present invention relates to a holding mechanism for changing operation modes in a pipelined computer, and more particularly to a holding mechanism for shortening an execution time of an instruction for changing operation modes (a mode changing instruction).
More specifically, the mode changing instruction changes an address mode, for example, between a real address mode and a virtual address mode. The mode changing instruction changes modes of an address computation or alternately changes them between a privilege mode that can execute all kinds of instructions and a general mode that can execute instructions other than the privilege instructions.
In the conventional pipelined computer, an execution result of the mode changing instruction has an effect almost on the whole of the pipeline computer, so that an instruction next to the mode changing instruction can not be executed in each stage of the pipeline immediately after the mode changing instruction. This originates in that the execution contents of the instructions subsequent to the preceding instruction are changed by the result of that instruction issued immediately before. The situations, that prevent the next instruction in the instruction stream from executing during its designated clock cycle, are called pipeline hazards. Particularly, the pipeline hazards caused by the mode changing instruction or the branching instruction are called the control hazards.
The pipelined computer is configured such that starting for the succeeding instruction is performed again after completion of the instruction that caused the control hazards when the control hazards occur, as is recited in omputer Architecture Chapter 6.4, FIG. 6.16, by Hennessy and Patterson.
The above described conventional pipelined computer has posed the problem in its performance that the pipeline execution can not be applied to the instructions succeeding to the mode changing instruction. Specifically, depending on the mode changed by the mode changing instruction it is changed whether the contents of the succeeding processing are changed or not. Moreover, since it is vague which stage of the pipeline the execution result for the mode changing instruction has an affect on, it can not help to take conservative countermeasures in order to perform processing for the succeeding instructions with safety.